package com.qf.test;

import com.qf.dao.StudentMapper;
import com.qf.pojo.Student;
import com.qf.pojo.Teacher;
import com.qf.util.MyBatisUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.Map;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/8/24 17:17
 */
public class Demo {
    private  StudentMapper mapper;
    @Before
    public void Before(){
        mapper= MyBatisUtils.getMapper(StudentMapper.class);
    }
    @After
    public void  After(){
        MyBatisUtils.commit();
        MyBatisUtils.close();
    }
    @Test
    public void testDuiStu(){
        Student student =mapper.selectStu(1001l);
        System.out.println("student = " + student);
    }
    @Test
    public void testDuiTea(){
        Teacher teacher =mapper.selectTea(1l);
        System.out.println("teacher = " + teacher);
    }
}
